﻿using Prices;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace Prices.Test
{
    [TestClass()]
    public class PriceIncreasedEventArgsTest
    {
        [TestMethod()]
        public void PriceIncreasedEventArgsConstructorTest()
        {
            int oldPrice = 2;
            int newPrice = 5;
            PriceIncreasedEventArgs target = new PriceIncreasedEventArgs(oldPrice, newPrice);
            Assert.AreEqual(oldPrice, target.OldPrice);
            Assert.AreEqual(newPrice, target.NewPrice);
        }

        [TestMethod()]
        public void PriceIncreasedEventArgsChangeTest()
        {
            int oldPrice = 2;
            int newPrice = 5;
            PriceIncreasedEventArgs target = new PriceIncreasedEventArgs(oldPrice, newPrice);
            oldPrice = 5;
            newPrice = 7;
            target.OldPrice = oldPrice;
            target.NewPrice = newPrice;
            Assert.AreEqual(oldPrice, target.OldPrice);
            Assert.AreEqual(newPrice, target.NewPrice);
        }
    }
}
